package com.gd.server.action;

import java.util.List;

import com.gd.common.entities.S_User;
import com.gd.common.net.RequestToServer;
import com.gd.common.net.Response;
import com.gd.common.util.Debug;
import com.gd.server.dao.UserDao;
import com.gd.server.service.DaoFactory;

public class SearchFriendAction extends ServerAction {

	@Override
	public void executeSome(RequestToServer request, Response response)
			throws Exception {

		String nickname = (String) request.getParameter("nickname");
		
		Debug.log("SearchFriend", "nickname=" + nickname );
		
		
		UserDao userDao = DaoFactory.getUserDao();
		
		List<S_User> user = userDao.searchUserList(nickname);
		Debug.log("SearchFriend", "user=" + user );
		
		response.addParameter("SearchUser", user); 
	}
}

